Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 3 - Geometric Styles / Geometric Styles Reference
Constants and Data Types


The Cap Structure

QuickDraw GX allows you to specify what to draw at the start and at the end of a shape's contours. In particular, you may specify a start cap for any point shape, and you may specify a start cap and an end cap for any line, curve, polygon, or path shape that has an open-frame shape fill.

QuickDraw GX uses the cap property of a shape's style object to store information about the start cap and end cap of the shape.

You use the cap structure when specifying cap information (using the GXSetStyleCap or GXSetShapeCap functions) and when retrieving cap information (using the GXGetStyleCap or GXGetShapeCap functions).

The cap structure is defined by the gxCapRecord data type:

struct gxCapRecord {
   gxCapAttribute attributes;
   gxShape        startCap;
   gxShape        endCap;
};
Field Description
attributes
Modifies the behavior of the caps. The next section, "Cap Attributes," describes the gxCapAttribute flags in detail.
startCap
Specifies what the start cap should look like. You must use shapes in their primitive form for the start cap shape. (Primitive shapes are described in detail in Chapter 4, "Geometric Operations," in this book.) You may not use framed shapes, shapes with an inverse shape fill, full shapes, text shapes, glyph shapes, layout shapes, bitmap shapes, or picture shapes as the start cap shape.
QuickDraw GX considers only the geometric properties (the shape type, the shape fill, and the shape geometry) of the shape specified by the startCap field. QuickDraw GX ignores the owner count, shape tags, and shape attributes properties and the style, ink, and transform objects of the start cap shape.
endCap
Specifies what the start cap should look like. You must use shapes in their primitive form for the end cap shape. (Primitive shapes are described in detail in Chapter 4, "Geometric Operations," in this book.) You may not use framed shapes, shapes with an inverse shape fill, full shapes, text shapes, glyph shapes, layout shapes, bitmap shapes, or picture shapes as the end cap shape.
QuickDraw GX considers only the geometric properties (the shape type, the shape fill, and the shape geometry) of the shape specified by the endCap field. QuickDraw GX ignores the owner count, shape tags, and shape attributes properties and the style, ink, and transform objects of the end cap shape.
See "Caps" beginning on page 3-23, "Adding Caps to a Shape" beginning on page 3-57, and "Adding Standard Caps to a Shape" beginning on page 3-59 for examples of caps.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help